package main

import "fmt"

type Student struct {
	name string
}

func (this Student) getName() (name string) {
	name = this.name
	return
}

func (this *Student) setName(name string) {
	this.name = name
}

func main() {
	stu := Student{}
	(&stu).setName("Mr2") // 等效于stu.setName("Mr")
	fmt.Println(stu.getName())
}
